package com.taptech.doufu.ui.fragment;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentTransaction;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.taptech.doufu.R;
import com.taptech.doufu.bean.AlbumsBean;
import com.taptech.doufu.constant.Constant;
import com.taptech.doufu.ui.view.drawcircle.DrawCircleService;

/**
 * author zhangyongcun
 * 16/9/29
 * 漫画排行
 */

public class CartoonRankListFragment extends DiaobaoBaseFragment {
    private DoufuContentFragment cartoonRankFragment;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view =  inflater.inflate(R.layout.cartoon_my_fragment, container, false);
        return view;
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        cartoonRankFragment = new DoufuContentFragment();
        cartoonRankFragment.setArgument("items", AlbumsBean.class, DrawCircleService.HANDLE_TYPE_LOAD_DRAW_CARTOON
                , DrawCircleService.BASE_URL + "albums/items?id=355" +  "&size=" + Constant.PAGE_SIZE_10);
        FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
        transaction.replace(R.id.cartoon_frame_container, cartoonRankFragment).commit();
    }

}